home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / setgroups.z / setgroups
Encoding:
Text File  |  2002-10-03  |  4.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSEEEETTTTGGGGRRRROOOOUUUUPPPPSSSS((((2222))))                                                      SSSSEEEETTTTGGGGRRRROOOOUUUUPPPPSSSS((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      setgroups - set group access list
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ppppaaaarrrraaaammmm....hhhh>>>>
  13.  
  14.    _P_O_S_I_X:
  15.      iiiinnnntttt sssseeeettttggggrrrroooouuuuppppssss((((iiiinnnntttt nnnnggggrrrroooouuuuppppssss,,,, ggggiiiidddd____tttt ****ggggiiiiddddsssseeeetttt))));;;;
  16.    _B_S_D:
  17.      iiiinnnntttt sssseeeettttggggrrrroooouuuuppppssss((((iiiinnnntttt nnnnggggrrrroooouuuuppppssss,,,, iiiinnnntttt ****ggggiiiiddddsssseeeetttt))));;;;
  18.  
  19.      To use the BSD version of _s_e_t_g_r_o_u_p_s, one must either
  20.  
  21.      1) explicitly invoke it as _B_S_D_s_e_t_g_r_o_u_p_s or
  22.  
  23.      2) link with the libbsd.a library:
  24.  
  25.           cc -o prog prog.c -lbsd
  26.  
  27.  
  28. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  29.      _s_e_t_g_r_o_u_p_s initializes the group access list of the current user process
  30.      according to the array _g_i_d_s_e_t.  The parameter _n_g_r_o_u_p_s indicates the
  31.      number of entries in the array.  The _s_y_s_c_o_n_f(____SSSSCCCC____NNNNGGGGRRRROOOOUUUUPPPPSSSS____MMMMAAAAXXXX) system call
  32.      may be used to determine at runtime the maximum allowable value for
  33.      _n_g_r_o_u_p_s in the particular kernel configuration (it is an lbootable value
  34.      (_n_g_r_o_u_p_s__m_a_x) which is declared in /var/sysgen/master.d/kernel).  If
  35.      using the BSD version, _n_g_r_o_u_p_s may never be greater than NNNNGGGGRRRROOOOUUUUPPPPSSSS (as
  36.      defined in <_s_y_s/_p_a_r_a_m._h>).
  37.  
  38.      Setting _n_g_r_o_u_p_s__m_a_x to zero and rebooting effectively disables multiple-
  39.      groups system-wide.  In most cases, however, it will be set to a value
  40.      between _N_G_R_O_U_P_S__U_M_I_N and _N_G_R_O_U_P_S__U_M_A_X (also defined in <_s_y_s/_p_a_r_a_m._h>).
  41.  
  42.      Only the super-user may set new groups or alter the value of _n_g_r_o_u_p_s__m_a_x.
  43.  
  44. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  45.      A successful call returns the number of groups in the group set.  A value
  46.      of -1 indicates that an error occurred, and the error code is stored in
  47.      the global variable _e_r_r_n_o.
  48.  
  49. EEEERRRRRRRROOOORRRRSSSS
  50.      The _s_e_t_g_r_o_u_p_s call will fail if:
  51.  
  52.      [EPERM]        The caller is not the super-user.
  53.  
  54.      [EFAULT]       The address specified for _g_i_d_s_e_t is outside the process
  55.                     address space.
  56.  
  57.      [EINVAL]       The _n_g_r_o_u_p_s parameter is greater than NNNNGGGGRRRROOOOUUUUPPPPSSSS or the
  58.                     kernel maximum, as specified above.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSEEEETTTTGGGGRRRROOOOUUUUPPPPSSSS((((2222))))                                                      SSSSEEEETTTTGGGGRRRROOOOUUUUPPPPSSSS((((2222))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      multgrps(1), getgroups(2), initgroups(3), sysconf(2)
  76.  
  77. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  78.      The POSIX and 4.3BSD versions differ in the types of their _g_i_d_s_e_t
  79.      parameter.
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.